#!/bin/bash
source /etc/profile
source ~/.bash_profile

if [ $# -ne 1 ] ; then
    echo "usage: $(basename $0) PROPS_FILE" >&2
    exit 2
fi

cur_date=$(date "+%Y%m%d")
logfile=${cur_date}.log
rsfile=rs.${cur_date}

echo "************************************开始测试runBenchmark $1 " 
if [ ! -f "$1" ];then
  echo "文件不存在"
  exit 1
fi

./runBenchmark.sh $1 >> ${logfile}

rm -rf ${rsfile}
cat ${logfile} | grep TPCC_REPORT >> ${rsfile}
cat ${rsfile}

